
<div class="content">

	<h1> <?php echo $title ;?> </h1>
	<?php
	echo anchor('perfil/','Voltar',array('class'=>'back'));
	$this->load->helper('form');
	 if (!isset($registro['id']) ){
		echo form_open('perfil/criar');
	 }
	else
	{
		 echo form_open('perfil/atualizar');
		echo form_hidden('id', $registro['id']); 
	};  ?>

	<div class="data" style="width: 50%">
		<table>
			<tr>
				<td style="width: 30%"><label >Nome</label>
				</td>
				<td><?php $options = array('name'=> 'nome',
              'id'          => 'nome',
              'maxlength'   => '100',
			  'value' =>@$registro['nome']);
				echo form_input($options); ?></td>
			</tr>

			<tr>
				<td valign="top"><label >Comentários</label>
				</td>
				<td><?php $options = array('name'=> 'comentario',
              'id'          => 'comentario',
              'maxlength'   => '100',
			  'value' =>@$registro['comentario']);
				echo form_input($options); ?>
				</td>
			</tr>
			<tr>
			<td valign="top"> <input type="submit" name="submit" value="<?php echo (!isset($registro['id'])) ?  "Criar novo Perfil" : "Atualizar Perfil";?>" />
			</td>
			</tr>
		</table>
		
			
		</div>
		<div class="error" style="width: 78.8%"> <?php echo validation_errors(); ?> </div>		
	</div>

	</form>



